﻿/*==============================================================
 * SmServerMapping.cs
 * Copyright (C) 2014 贵州惠众互联 Inc. All rights reserved.
 *==============================================================
 * Author:   罗应红
 * Date:     2014/02/17 10:45:54.
 * Version:  1.0
 * QQ:		 88962800
*==============================================================*/

using System.ComponentModel.DataAnnotations;
using System.Data.Entity.ModelConfiguration;
using QDT.P2B.Domain.Messages;

namespace QDT.Core.MSData.Mapping {
    public class SmServerMapping:EntityTypeConfiguration<SmsServer> {
        public SmServerMapping() {
            HasKey(o => o.ID);
            Property(o => o.ID).HasDatabaseGeneratedOption(DatabaseGeneratedOption.Identity).HasColumnName("id");
            Property(o => o.ServerName).HasColumnName("name");
            Property(o => o.Description).HasColumnName("description");
            Property(o => o.ClassName).HasColumnName("class_name");
            Property(o => o.UserName).HasColumnName("user_name");
            Property(o => o.Password).HasColumnName("password");
            Property(o => o.ConfigInfo).HasColumnName("config");
            ToTable(DB.TPref("sms"));
        }
    }
}